<?php
/**
 * 在进入后台前的其他限制
 *
 * created by.
 * User: EDZ
 * Date: 2020/9/12
 * TIME: 14:27
 */

namespace app\admin_product_libaray\admin_base_module\service;

use app\admin_product_libaray\admin_ready_module\service\BeforeService;
use think\Controller;
use think\facade\Session;

class BackBase extends Controller {

    /**
     * 后台站点加载中...
     *
     */
    public function initialize() {
        parent::initialize();
        if (BeforeService::siteStatus() == 'no') exit('服务器繁忙，请稍后重试...');
        if (empty(Session::get('userInfo'))) $this->redirect('Login/login');
    }
}